<?php

  if (!ini_get("register_argc_argv"))
    die("register_argc_argv must be enabled ini your php.ini file");

  $current_include_path = get_include_path();
  set_include_path("./library" . PATH_SEPARATOR . $current_include_path);

  require_once "JooS/Config.php";
  require_once "JooS/PHPackager/Manager.php";

  $root = JooS_Config::PHPackager()->path();
  $paths = JooS_Config::PHPackager()->include_path();
  if (is_array($paths)) {
    $include_path = array();
    foreach ($paths as $path)
      array_push($include_path, $root . DIRECTORY_SEPARATOR . $path);

    set_include_path(implode(PATH_SEPARATOR, $include_path));
  }

  JooS_PHPackager_Manager::removePackage($_SERVER["argv"][1]);
